﻿<style type="text/css">
</style>
<div class="mv-edit validate-area" style="margin-top:10px;">
    <div class="cont-top">
        <span>价格</span>
        <input id="price" type="text" class="validate-elem" validate="true" validate-message="请输入价格" placeholder="请输入价格" :value="bag.price">
    </div>
    <div class="cont-top">
        <span>委托数量</span>
        <input id="amount" type="text" class="validate-elem" validate="true" validate-message="请输入委托数量" placeholder="请输入委托数量" :value="bag.amount">
    </div>
    <div class="cont-top">
        <span>最小限额</span>
        <input id="amount_min" type="text" class="validate-elem" validate="true" validate-message="请输入最小限额" placeholder="请输入最小限额" :value="bag.amount_min">
    </div>
    <div class="cont-top">
        <span>最大限额</span>
        <input id="amount_max" type="text" class="validate-elem" validate="true" validate-message="请输入最大限额" placeholder="请输入最大限额" :value="bag.amount_max">
    </div>
    <div class="cont-top">
        <span style="height:45px;">支付方式</span>
        <label><input id="wechat" type="checkbox" class="validate-elem" :checked="bag.pay_wechat">微信</label>
        <label><input id="alipay" type="checkbox" class="validate-elem" :checked="bag.pay_alipay">支付宝</label>
        <label><input id="bank" type="checkbox" class="validate-elem" :checked="bag.pay_bank">银行</label>
    </div>
    <div class="cont-top">
        <span>备注</span>
        <input id="explain" type="text" class="validate-elem" :value="bag.explain">
    </div>
    <div class="cont-top" v-if="bag.basis.info.issetsafeword == false">
        <span>交易密码</span>
        <input id="safeword" type="password" class="validate-elem" validate="true" validate-message="请输入交易密码" placeholder="请输入交易密码">
    </div>
</div>
<div style="height:60px;"></div>
<script type="text/javascript">
    var pagedata = {
        request: {
            method: "VIEW_TRANSACTION_BILLEDIT",
            id: mview.view.chlid.param.id
        },
        screen: {
            header_ok_display: true,
            header_display: true,
            header_title_name: "编辑公告",
            header_exit_name: "返回",
            header_ok_name: '编辑',
            header_exit_click: function () {
                mview.view.load('/views/Module/Transaction/billlists.html');
            },
            header_ok_click: function () {
                //调用验证表单程序
                mview.view.form.validate("validate-area", function (data) {
                    mview.socket.send({
                        data: {
                            method: "TRANSACTION_EDIT",
                            id: mview.view.chlid.param.id,
                            price: data.price,
                            amount_min: data.amount_min,
                            amount_max: data.amount_max,
                            amount: data.amount,
                            wechat: String(data.wechat),
                            alipay: String(data.alipay),
                            bank: String(data.bank),
                            explain: data.explain,
                            safeword: data.safeword || "",
                        },
                        success: function (data) {
                            if (data.Code == 0) {
                                mview.view.load('/views/Module/Transaction/billlists.html');
                            }
                            else {
                                mview.control.tips(data.Message);
                            }
                        }
                    });
                });
            },
            header_display: true,
            footer_choose: "user"
        },
        data: {

        },
        methods: {
        }
    }
    mview.view.chlid.init(pagedata);
</script>